package com.ruicar.afs.cloud.common.modules.afscorebusiness.enums;

import lombok.Getter;

/**
 * 放款申请状态（合作商/SP端状态）
 *
 * @author xueyu.ma
 */
@Getter
public enum LoanBusinessStateOutEnum {
    /**
     * 放款待提交
     */
    LOAN_WAIT_SUBMIT("waitSubmit", "放款待提交"),
    /**
     * 放款已提交
     */
    LOAN_SUBMIT("submit", "放款已提交"),
    /**
     * 放款待审核
     */
    LOAN_WAIT_APPROVE("waitApprove", "放款待审核"),
    /**
     * 放款退回
     */
    LOAN_RETURN("return", "放款退回"),
    /**
     * 放款审核通过
     */
    LOAN_APPROVE_DONE("approveDone", "放款审核通过");

    public String state;
    public String desc;

    LoanBusinessStateOutEnum(String state, String desc) {
        this.state = state;
        this.desc = desc;
    }

    public static String getDescBystate(String state) {
        for (LoanBusinessStateOutEnum info : values()) {
            if (state.equals(info.getState())) {
                return info.getDesc();
            }
        }
        return null;
    }
}
